"""Walkthrough examples for using Tink."""

package(default_visibility = ["//visibility:public"])

licenses(["notice"])

cc_library(
    name = "test_util",
    testonly = 1,
    srcs = ["test_util.cc"],
    hdrs = ["test_util.h"],
    deps = [
        ":load_cleartext_keyset",
        "@com_google_absl//absl/strings",
        "@tink_cc",
    ],
)

cc_library(
    name = "create_keyset",
    srcs = ["create_keyset.cc"],
    hdrs = ["create_keyset.h"],
    deps = [
        "@tink_cc",
        "@tink_cc//:keyset_handle",
        "@tink_cc//util:statusor",
    ],
)

cc_test(
    name = "create_keyset_test",
    srcs = ["create_keyset_test.cc"],
    deps = [
        ":create_keyset",
        "@com_google_absl//absl/strings",
        "@com_google_googletest//:gtest_main",
        "@tink_cc",
        "@tink_cc//util:test_matchers",
    ],
)

cc_library(
    name = "load_cleartext_keyset",
    srcs = ["load_cleartext_keyset.cc"],
    hdrs = ["load_cleartext_keyset.h"],
    deps = [
        "@com_google_absl//absl/strings",
        "@tink_cc",
        "@tink_cc//:cleartext_keyset_handle",
    ],
)

cc_test(
    name = "load_cleartext_keyset_test",
    srcs = ["load_cleartext_keyset_test.cc"],
    deps = [
        ":load_cleartext_keyset",
        "@com_google_absl//absl/status",
        "@com_google_absl//absl/strings",
        "@com_google_googletest//:gtest_main",
        "@tink_cc",
        "@tink_cc//util:test_matchers",
    ],
)

cc_library(
    name = "load_encrypted_keyset",
    srcs = ["load_encrypted_keyset.cc"],
    hdrs = ["load_encrypted_keyset.h"],
    deps = [
        "@com_google_absl//absl/strings",
        "@tink_cc",
    ],
)

cc_test(
    name = "load_encrypted_keyset_test",
    srcs = ["load_encrypted_keyset_test.cc"],
    deps = [
        ":load_cleartext_keyset",
        ":load_encrypted_keyset",
        ":test_util",
        "@com_google_absl//absl/memory",
        "@com_google_absl//absl/status",
        "@com_google_absl//absl/strings",
        "@com_google_googletest//:gtest_main",
        "@tink_cc",
        "@tink_cc//util:test_matchers",
    ],
)

cc_library(
    name = "write_keyset",
    srcs = ["write_keyset.cc"],
    hdrs = ["write_keyset.h"],
    deps = [
        "@com_google_absl//absl/status",
        "@com_google_absl//absl/strings",
        "@tink_cc",
    ],
)

cc_test(
    name = "write_keyset_test",
    srcs = ["write_keyset_test.cc"],
    deps = [
        ":load_cleartext_keyset",
        ":load_encrypted_keyset",
        ":test_util",
        ":write_keyset",
        "@com_google_absl//absl/memory",
        "@com_google_absl//absl/strings",
        "@com_google_googletest//:gtest_main",
        "@tink_cc",
        "@tink_cc//util:test_matchers",
    ],
)

cc_library(
    name = "obtain_and_use_a_primitive",
    srcs = ["obtain_and_use_a_primitive.cc"],
    hdrs = ["obtain_and_use_a_primitive.h"],
    deps = [
        "@com_google_absl//absl/strings",
        "@tink_cc",
    ],
)

cc_test(
    name = "obtain_and_use_a_primitive_test",
    srcs = ["obtain_and_use_a_primitive_test.cc"],
    deps = [
        ":load_cleartext_keyset",
        ":obtain_and_use_a_primitive",
        "@com_google_googletest//:gtest_main",
        "@com_google_absl//absl/strings",
        "@tink_cc",
        "@tink_cc//util:test_matchers",
    ],
)
